package com.ddone.movie;

import com.ddone.movie.bean.Movie;
import com.ddone.movie.service.MovieService;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author ddone
 * @date 2024/3/22-17:54
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:application.xml")
@Slf4j
public class MovieServiceTest {
    @Autowired
    private MovieService movieService;

    @Test
    public void testGetAll(){
        movieService.getAll().forEach(m->log.warn("movie: "+m));
    }

    @Test
    public void testGetMovieById(){
        Movie movie = movieService.getMovieById("95A2BD682CC24EE0B59CE91501C55ABF");
        log.warn("movie = " + movie);
    }

    @Test
    public void testGetOne(){
        movieService.getMovieById("3");
    }



}
